﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using Cvk.News;
using CoreNhaDat;
using CoreBDS;

namespace BatDongSan.Modules
{
    public partial class Uct_Menu : System.Web.UI.UserControl
    {
        protected void Page_Load(object sender, EventArgs e)
        {
            LoadNewsTypes();
        }
        public void LoadNewsTypes()
        {
            try
            {
                //Nha dat ban
                rptNhaDatBan.DataSource = LoaiNhaDatBll.GetList(false, true, 1, Utility.strConnect);
                rptNhaDatBan.DataBind();
                //Nha dat cho thue
                rptNhaDatChoThue.DataSource = LoaiNhaDatBll.GetList(false, true, 2, Utility.strConnect);
                rptNhaDatChoThue.DataBind();
                //can mua
                rptCanmua.DataSource = LoaiNhaDatBll.GetList(false, true, 3, Utility.strConnect);
                rptCanmua.DataBind();
                //can thue
                rptCanthue.DataSource = LoaiNhaDatBll.GetList(false, true, 4, Utility.strConnect);
                rptCanthue.DataBind();
                //Tin tuc
                rptNews.DataSource = NewsBll.claNewsTypeDetail.GetListByParentId(1, 1, Utility.strConnect);
                rptNews.DataBind();
                //Cam nang
                rptCamNang.DataSource = NewsBll.claNewsTypeDetail.GetListByParentId(1, 7, Utility.strConnect);
                rptCamNang.DataBind();
                //Phong thuy
                rptPhongThuy.DataSource = NewsBll.claNewsTypeDetail.GetListByParentId(1, 12, Utility.strConnect);
                rptPhongThuy.DataBind();
                //Doanh nghiep
                rptBusiness.DataSource = FieldOfBusinessBll.GetList(Utility.strConnect);
                rptBusiness.DataBind();
                //Du an
                rptProject.DataSource = FieldOfActionBll.GetList(Utility.strConnect);
                rptProject.DataBind();
            }
            catch { }
        }
    }
}